from myelin.Ns import WOT
from myelin.rdf.Ns import OWL_NS, RDFS
from myelin.rdf.bindery.ObjectTypes import ResourceTypeO, LiteralTypeO

from VocabSchema import VocabSchema

from ObjectTypes import \
    OntologyTypeO, OntologyTypeS, \
    VocabSchemaTypeS

from mappings import \
    SchemaMap, SchemaRelationsMap, \
    TrustMap, IsDefinedByOfMap


class Ontology(VocabSchema):
    
    ModelTypes = (OntologyTypeO, OntologyTypeS)
    
    RDF_BINDINGS = {
                
        'wotSrc_Assurance'  : ((WOT, 'src_assurance'), ResourceTypeO, TrustMap),
        'wotAssurance'      : ((WOT, 'assurance'), ResourceTypeO, TrustMap),
    
        'owlImports'        : ((OWL_NS, 'imports'), OntologyTypeO, SchemaRelationsMap),
        'owlPriorVersion'   : ((OWL_NS, 'priorVersion'), OntologyTypeO, SchemaMap),
        'owlVersionInfo'    : ((OWL_NS, 'versionInfo'), LiteralTypeO, SchemaMap),
            
        'rdfsIsDefinedByOf'  : ((RDFS, 'isDefinedBy'), VocabSchemaTypeS, IsDefinedByOfMap),
    }

CLASS_TYPES = {
    OWL_NS + 'Ontology' : Ontology,
}